package com.kjjt.util;

import lombok.AllArgsConstructor;
import lombok.Data;

@Data
@AllArgsConstructor
public class Result {
    private boolean success;
    private String message;
    private Object data;

    public static Result success(Object data) {
        return new Result(true, "成功", data);
    }

    public static Result success() {
        return new Result(true, "成功", null);
    }

    public static Result fail(String message) {
        return new Result(false, message, null);
    }

    public static Result fail() {
        return new Result(false, "失败", null);
    }
}
